package com.yang.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Administrator
 * @decription RefreshScope很重要,别忘了
 * @Date 2018-05-22 14:28
 */
@RestController
@RefreshScope
public class HiController {

    @Value("${foo}")
    String foo;

    @RequestMapping(value = "/hi")
    public String sayHi() {
        return foo;
    }
}
